.if !'po4a'hide' .TH squidclient 1
.
.SH NAME
squidclient \- A simple HTTP web client tool
.
.SH SYNOPSIS
.if !'po4a'hide' .B squidclient
.if !'po4a'hide' .B "[ \-aknNrsv ] "
.if !'po4a'hide' .B "[ \-\-ping [ping\-options] ] "
.if !'po4a'hide' .B "[ \-\-https] [tls\-options] [ \-A"
string
.if !'po4a'hide' .B "] [ \-h | \-\-host"
remote host
.if !'po4a'hide' .B "] [ \-H '"
string
.if !'po4a'hide' .B "' ] [ \-i"
IMS
.if !'po4a'hide' .B "] [ \-j '"
Host header
.if !'po4a'hide' .B "' ] [ \-l | \-\-local"
host
.if !'po4a'hide' .B "] [ \-m"
method
.if !'po4a'hide' .B "] [ \-p | \-\-port"
port
.if !'po4a'hide' .B "] [ \-P"
file
.if !'po4a'hide' .B "] [ \-t"
count
.if !'po4a'hide' .B "] [ \-T"
timeout
.if !'po4a'hide' .B "] [ \-u"
user
.if !'po4a'hide' .B "] [ \-U"
user
.if !'po4a'hide' .B "] [ \-V"
version
.if !'po4a'hide' .B "] [ \-w"
password
.if !'po4a'hide' .B "] [ \-W"
password
.if !'po4a'hide' .B "] "
url
.
.PP
.if !'po4a'hide' .B "Ping options: [ \-g"
count
.if !'po4a'hide' .B "] [ \-I"
interval
.if !'po4a'hide' .B "] "
.
.PP
.if !'po4a'hide' .B "TLS options: [ \-\-anonymous\-tls ] [ \-\-trusted\-ca"
CA certificates file
.if !'po4a'hide' .B "...] [ \-\-cert"
client X.509 certificate file
.if !'po4a'hide' .B "] [ \-\-params"
TLS session parameters
.if !'po4a'hide' .B "] "
.
.SH DESCRIPTION
.B squidclient
is a tool providing a command line interface for retrieving URLs.
Designed for testing any HTTP 0.9, 1.0, or 1.1 web server or proxy.
This tool can be combined with scripts to perform any basic HTTP operation.
Some additional features for access to the 
.B squid
proxy object cache and management information are provided.
.
.SH OPTIONS
.if !'po4a'hide' .TP 12
.if !'po4a'hide' .B "\-a"
Do NOT include Accept: header.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-A 'string'"
Send 
.B string
as User-Agent: header. To omit the header completely set string to empty ('').
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-h | \-\-host host"
Retrieve URL from server host.  Default is
.B localhost
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-H 'string'"
Extra headers to send. Use
.B '\en'
for new lines.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-i time"
If\-Modified\-Since time (in Epoch seconds).
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-j hosthdr"
Host header content
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-k"
Keep the connection active. Default is to do only one request then close.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-l | \-\-local host"
Specify a local IP address to bind to.  Default is none.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-m method"
Request method, default is
.I GET.
Squid also supports a non-standard method called
.I PURGE.
You can use that to purge a specific URL from the cache.
You need to have
.I purge
access setup in
.B squid.conf
similar to
.I manager
access. Here is an example:
.if !'po4a'hide' .nf
.if !'po4a'hide'       acl purge method PURGE
.if !'po4a'hide'       http_access deny purge !localhost
.if !'po4a'hide' .fi
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-n"
Proxy Negotiate(Kerberos) authentication.
.if !'po4a'hide' .nf
Use kinit username@DOMAIN first to get initial TGS.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-N"
WWW Negotiate(Kerberos) authentication.
.if !'po4a'hide' .nf
Use kinit username@DOMAIN first to get initial TGS.
.if !'po4a'hide' .fi
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-p port"
Port number of cache.  Default is 3128.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-P file"
Request body. Using the named file as data.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-r"
Force cache to reload URL.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-s"
Silent.  Do not print data to stdout.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-t count"
Trace
.I count
HTTP relay or proxy hops
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-T timeout"
Timeout value (seconds) for read/write operations.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-u user"
Proxy authentication username
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-U user"
WWW authentication username
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-v"
Verbose. Print outgoing message to stderr.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-V version"
HTTP Version. Use '\-' for HTTP/0.9 omitted case
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-w password"
Proxy authentication password
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-W password"
WWW authentication password
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-https"
Use Transport Layer Security on the HTTP connection.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-anonymous\-tls"
Use TLS with unauthenticated (anonymous) certificate.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-cert file"
File containing client X.509 certificate in PEM format.
May be repeated to load several client certificates.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-trusted\-ca file"
File containing trusted Certificate Authority (CA) certificates in PEM format.
May be repeated to load any number of files.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-params values"
TLS library specific parameters for the communication session.
See the library documentation for details on valid parameters.
.if !'po4a'hide' .I "GnuTLS: http://gnutls.org/manual/html_node/Priority\-Strings.html"
If repeated only the last value will have effect.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-\-ping [options]"
Enable ping mode. Optional \-g and \-I parameters must follow immediately if used.
Repeated use resets to default ping settings.
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-g count"
Ping mode, perform
.I count
iterations (default is to loop until interrupted).
.
.if !'po4a'hide' .TP
.if !'po4a'hide' .B "\-I interval"
Ping interval in seconds (default 1 second).
.
.SH AUTHOR
This program and manual was written by
.if !'po4a'hide' .I Amos Jeffries <amosjeffries@squid-cache.org>
.PP
Based on original code derived from Harvest and further developed by
numerous individuals from the internet community.
.
.SH COPYRIGHT
.PP
 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
 *
 * Squid software is distributed under GPLv2+ license and includes
 * contributions from numerous individuals and organizations.
 * Please see the COPYING and CONTRIBUTORS files for details.
.
.SH QUESTIONS
Questions on the usage of this program can be sent to the
.I Squid Users mailing list
.if !'po4a'hide' <squid-users@lists.squid-cache.org>
.
.SH REPORTING BUGS
See http://wiki.squid-cache.org/SquidFaq/BugReporting for details of what you need to include with your bug report.
.PP
Report bugs or bug fixes using http://bugs.squid-cache.org/
.PP
Report serious security bugs to
.I Squid Bugs <squid-bugs@lists.squid-cache.org>
.PP
Report ideas for new improvements to the
.I Squid Developers mailing list
.if !'po4a'hide' <squid-dev@lists.squid-cache.org>
.
.SH SEE ALSO
.if !'po4a'hide' .BR squid "(8), "
.if !'po4a'hide' .BR cachemgr.cgi "(8)"
